package com.gufe.controller.admin.datascreen;

import com.gufe.result.Result;
import com.gufe.service.admin.datascreen.LeftChartService;
import com.gufe.vo.datascreen.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RequestMapping("/admin/dataScreen")
@RestController
public class LeftChartController {

    @Autowired
    private LeftChartService leftChartService;

    @GetMapping("/leftTopChart")
    public Result<List<LeftTopChartVO>> leftTopChartData() {
        List<LeftTopChartVO> list = leftChartService.getLeftTopChartData();
        return Result.success(list);
    }

    @GetMapping("/leftTopMainChart")
    public Result<List<LeftTopMainChartVO>> leftTopMainChartData() {
        List<LeftTopMainChartVO> list = leftChartService.getLeftTopMainChartData();
        return Result.success(list);
    }


    @GetMapping("/leftCenterChart")
    public Result<LeftCenterChartVO> leftCenterChartData(Integer[] ages){
        LeftCenterChartVO leftCenterChartVO = leftChartService.getLeftCenterChartData(ages);
        return Result.success(leftCenterChartVO);
    }

    @GetMapping("/leftCenterMainChart")
    public Result<LeftCenterMainChatVO> leftCenterMainChartData(Integer[] ages){
        LeftCenterMainChatVO leftCenterMainChatVO = leftChartService.getLeftCenterMainChartData(ages);
        return Result.success(leftCenterMainChatVO);
    }


    @GetMapping("/leftBottomChart")
    public Result<LeftBottomChartVO> leftBottomChartData(){
        LeftBottomChartVO leftBottomChartVO = leftChartService.getLeftBottomChartData();
        return Result.success(leftBottomChartVO);
    }

    @GetMapping("/leftBottomMainChart")
    public Result<LeftBottomMainChartVO> leftBottomMainChartData(){
         LeftBottomMainChartVO leftBottomMainChartData = leftChartService.getLeftBottomMainChartData();
        return Result.success(leftBottomMainChartData);
    }

    @GetMapping("/heard")
    public Result<HeardVO> getHeardData(){
        HeardVO heardVO = leftChartService.getHeadData();
        return Result.success(heardVO);
    }




}
